package com.jinxin.platform.cdacscontrolmgr.service.impl;

import com.jinxin.platform.cdacscontrolmgr.bean.CdfinanmodFeerule;
import com.jinxin.platform.cdacscontrolmgr.bean.bo.OptionItem;
import com.jinxin.platform.cdacscontrolmgr.mapper.CdacscontrolmgrFeeruleMapper;
import com.jinxin.platform.cdacscontrolmgr.service.ICdacscontrolmgrFeeruleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;

/**
 * All rights Reserved, Designed By www.beonelot.com
 *
 * @version: V1.0
 * @Copyright: www.beonelot.com Inc. All rights reserved.
 * @Description：
 * @Date: 2021-09-14
 * @Author: Lingnan
 **/
@Service
public class CdacscontrolmgrFeeruleServiceImpl implements ICdacscontrolmgrFeeruleService {
    @Autowired
    CdacscontrolmgrFeeruleMapper cdacscontrolmgrFeeruleMapper;

    @Override
    public CdfinanmodFeerule getById(String id) {
        if(StringUtils.isEmpty(id)){return null;}
        return cdacscontrolmgrFeeruleMapper.selectByKey(id);
    }

    @Override
    public List<OptionItem> listOptions(String orgId) {
        if(StringUtils.isEmpty(orgId)){return null;}
        return cdacscontrolmgrFeeruleMapper.listOptions(orgId);
    }
}
